package main
import "fmt"

type Animal struct {
	Name string
}

func (a *Animal) run() {
	fmt.Printf("%v is running!~~~\n", a.Name)
}

type Cat struct {
	Age int
	Animal
}

func (c *Cat) catchMouse() {
	fmt.Printf("%v is catching mouse!\n", c.Name)
}

func main() {
	var cat = Cat{
		Animal: Animal{
			Name: "Tom",
		},
		Age: 3,
	}
	cat.run()
	cat.catchMouse()
}



